import 'package:xin_he/generated/json/base/json_field.dart';
import 'package:xin_he/generated/json/xin_he_address_item_model_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class XinHeAddressItemModelEntity {
	int? id;
	int? fUserId;
	String? name;
	String? telephone;
	int? fProvinceId;
	int? fCityId;
	int? fAreaId;
	String? detail;
	String? province;
	String? city;
	String? area;
	int? isDefault;
	dynamic remark;
	@JSONField(name: "version_num")
	dynamic versionNum;
	dynamic removed;
	dynamic createTime;
	dynamic updateTime;
	dynamic fCreateUserId;
	dynamic fUpdateUserId;
	bool isSelected = false;

	XinHeAddressItemModelEntity();

	factory XinHeAddressItemModelEntity.fromJson(Map<String, dynamic> json) => $XinHeAddressItemModelEntityFromJson(json);

	Map<String, dynamic> toJson() => $XinHeAddressItemModelEntityToJson(this);

	XinHeAddressItemModelEntity copyWith({int? id, int? fUserId, String? name, String? telephone, int? fProvinceId, int? fCityId, int? fAreaId, String? detail, String? province, String? city, String? area, int? isDefault, dynamic remark, dynamic versionNum, dynamic removed, dynamic createTime, dynamic updateTime, dynamic fCreateUserId, dynamic fUpdateUserId}) {
		return XinHeAddressItemModelEntity()
			..id= id ?? this.id
			..fUserId= fUserId ?? this.fUserId
			..name= name ?? this.name
			..telephone= telephone ?? this.telephone
			..fProvinceId= fProvinceId ?? this.fProvinceId
			..fCityId= fCityId ?? this.fCityId
			..fAreaId= fAreaId ?? this.fAreaId
			..detail= detail ?? this.detail
			..province= province ?? this.province
			..city= city ?? this.city
			..area= area ?? this.area
			..isDefault= isDefault ?? this.isDefault
			..remark= remark ?? this.remark
			..versionNum= versionNum ?? this.versionNum
			..removed= removed ?? this.removed
			..createTime= createTime ?? this.createTime
			..updateTime= updateTime ?? this.updateTime
			..fCreateUserId= fCreateUserId ?? this.fCreateUserId
			..fUpdateUserId= fUpdateUserId ?? this.fUpdateUserId;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}